--- /dev/null
+#!/bin/sh
+@gjs@ @pkgdatadir@/@app_id@ "$@"
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.Gtk = '3.0';
+imports.package.initFormat();
+
const Gettext = imports.gettext;
const { Gdk, GLib, Gio, GObject, Gtk } = imports.gi;
-const Format = imports.format;
const _ = Gettext.gettext;
-const Config = imports.misc.config;
const ExtensionUtils = imports.misc.extensionUtils;
const { loadInterfaceXML } = imports.misc.fileUtils;
super.vfunc_startup();
let provider = new Gtk.CssProvider();
- let uri = 'resource:///org/gnome/shell/css/application.css';
+ let uri = 'resource:///org/gnome/Extensions/css/application.css';
try {
provider.load_from_file(Gio.File.new_for_uri(uri));
} catch (e) {
}
vfunc_command_line(commandLine) {
- let args = commandLine.get_arguments();
-
- if (args.length) {
- let uuid = args[0];
+ let [prgName_, uuid] = commandLine.get_arguments();
+ if (uuid) {
// Strip off "extension:///" prefix which fakes a URI, if it exists
uuid = stripPrefix(uuid, 'extension:///');
var ExtensionsWindow = GObject.registerClass({
GTypeName: 'ExtensionsWindow',
- Template: 'resource:///org/gnome/shell/ui/extensions-window.ui',
+ Template: 'resource:///org/gnome/Extensions/ui/extensions-window.ui',
InternalChildren: [
'userList',
'systemList',
comments: _('Manage your GNOME Extensions'),
license_type: Gtk.License.GPL_2_0,
logo_icon_name: 'org.gnome.Extensions',
- version: Config.PACKAGE_VERSION,
+ version: imports.package.version,
transient_for: this,
modal: true,
var ExtensionRow = GObject.registerClass({
GTypeName: 'ExtensionRow',
- Template: 'resource:///org/gnome/shell/ui/extension-row.ui',
+ Template: 'resource:///org/gnome/Extensions/ui/extension-row.ui',
InternalChildren: [
'nameLabel',
'descriptionLabel',
userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']),
};
-
- String.prototype.format = Format.format;
}
function main(argv) {
--- /dev/null
+app_id = 'org.gnome.Extensions'
+prgname = 'gnome-shell-extension-prefs'
+
+launcherconf = configuration_data()
+launcherconf.set('app_id', app_id)
+launcherconf.set('PACKAGE_NAME', meson.project_name())
+launcherconf.set('PACKAGE_VERSION', meson.project_version())
+launcherconf.set('prefix', prefix)
+launcherconf.set('libdir', libdir)
+launcherconf.set('pkgdatadir', pkgdatadir)
+launcherconf.set('gjs', gjs.path())
+
+configure_file(
+ input: prgname + '.in',
+ output: prgname,
+ configuration: launcherconf,
+ install_dir: bindir,
+ install_mode: 'rwxr-xr-x',
+)
+
+configure_file(
+ input: app_id + '.in',
+ output: app_id,
+ configuration: launcherconf,
+ install_dir: pkgdatadir,
+)
+
+config_dir = '@0@/..'.format(meson.current_build_dir())
+
+gnome.compile_resources(
+ app_id + '.src',
+ app_id + '.src.gresource.xml',
+ dependencies: [config_js],
+ source_dir: ['.', '..', config_dir],
+ gresource_bundle: true,
+ install: true,
+ install_dir: pkgdatadir
+)
+
+gnome.compile_resources(
+ app_id + '.data',
+ app_id + '.data.gresource.xml',
+ gresource_bundle: true,
+ install: true,
+ install_dir: pkgdatadir
+)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/Extensions">
+ <file>css/application.css</file>
+
+ <file>ui/extension-row.ui</file>
+ <file>ui/extensions-window.ui</file>
+ </gresource>
+</gresources>
--- /dev/null
+imports.package.start({
+ name: '@PACKAGE_NAME@',
+ version: '@PACKAGE_VERSION@',
+ prefix: '@prefix@',
+ libdir: '@libdir@',
+});
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/Extensions/js">
+ <file>main.js</file>
+
+ <file>misc/config.js</file>
+ <file>misc/extensionUtils.js</file>
+ <file>misc/fileUtils.js</file>
+ </gresource>
+</gresources>
subdir('misc')
subdir('dbusServices')
+subdir('extensionPrefs')
js_resources = gnome.compile_resources(
'js-resources', 'js-resources.gresource.xml',
c_name: 'portal_js_resources',
dependencies: [config_js]
)
-
-prefs_resources = gnome.compile_resources(
- 'prefs-resources', 'prefs-resources.gresource.xml',
- source_dir: ['.', meson.current_build_dir()],
- c_name: 'prefs_js_resources',
- dependencies: [config_js]
-)
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
- <gresource prefix="/org/gnome/shell">
- <file>extensionPrefs/main.js</file>
-
- <file>misc/config.js</file>
- <file>misc/extensionUtils.js</file>
- <file>misc/fileUtils.js</file>
-
- <file alias="css/application.css">extensionPrefs/css/application.css</file>
-
- <file alias="ui/extension-row.ui">extensionPrefs/ui/extension-row.ui</file>
- <file alias="ui/extensions-window.ui">extensionPrefs/ui/extensions-window.ui</file>
- </gresource>
-</gresources>
+++ /dev/null
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-
-#include "config.h"
-
-#include <gjs/gjs.h>
-#include <glib/gi18n.h>
-
-int
-main (int argc, char *argv[])
-{
- const char *search_path[] = { "resource:///org/gnome/shell", NULL };
- GError *error = NULL;
- GjsContext *context;
- int status;
-
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- context = g_object_new (GJS_TYPE_CONTEXT,
- "search-path", search_path,
- NULL);
-
- if (!gjs_context_define_string_array(context, "ARGV",
- argc - 1, (const char**)argv + 1,
- &error))
- {
- g_message("Failed to defined ARGV: %s", error->message);
- g_error_free (error);
- g_object_unref (context);
-
- return 1;
- }
-
- if (!gjs_context_eval (context,
- "const Main = imports.extensionPrefs.main; Main.main(ARGV);",
- -1,
- "<main>",
- &status,
- &error))
- {
- g_message ("Execution of main.js threw exception: %s", error->message);
- g_error_free (error);
- g_object_unref (context);
-
- return status;
- }
-
- g_object_unref (context);
- return 0;
-}
install: true
)
-executable('gnome-shell-extension-prefs',
- 'gnome-shell-extension-prefs.c', prefs_resources,
- c_args: tools_cflags,
- dependencies: tools_deps,
- include_directories: [conf_inc],
- install: true
-)
-
-
if have_networkmanager
executable('gnome-shell-portal-helper',
'gnome-shell-portal-helper.c', portal_resources,